package infoholders;

import java.io.IOException;
import java.util.Calendar;
import java.util.GregorianCalendar;

import people.Patient;
import people.Nurse;

public class AppointmentTester {
	public static void main(String[] args) throws IOException {
		Patient pat = new Patient("Jim", "Bob");
		pat.setUserID("Bob");
		Nurse nur = new Nurse("Betty", "Nurse");
		nur.setUserID("Betty");

		Calendar start = new GregorianCalendar(2010, 3, 6, 10, 0);
		Calendar end = new GregorianCalendar(2010, 3, 6, 11, 0);

		String desc = "Getting teeth pulled";

		Appointment a = new Appointment(pat, nur, start, end, desc);

		System.out.println("completed");
		System.out.println(a.getId());

		Patient pat2 = new Patient("Other", "Guy");
		pat2.setUserID("OtherGuy");

		// change the patient
		a.setPatient(pat2);

		// update the patient from Bob to OtherGuy
		a.update();
	}
}
